package com.shbt.entity;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TBookRank entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "t_book_rank", catalog = "default_schema")
public class TBookRank implements java.io.Serializable {

	// Fields

	private Integer id;
	private String rankCode;
	private String rankName;
	private String backup;
	private Set<TReleaseSell> TReleaseSells = new HashSet<TReleaseSell>(0);

	// Constructors

	/** default constructor */
	public TBookRank() {
	}

	/** minimal constructor */
	public TBookRank(Integer id) {
		this.id = id;
	}

	/** full constructor */
	public TBookRank(Integer id, String rankCode, String rankName,
			String backup, Set<TReleaseSell> TReleaseSells) {
		this.id = id;
		this.rankCode = rankCode;
		this.rankName = rankName;
		this.backup = backup;
		this.TReleaseSells = TReleaseSells;
	}

	// Property accessors
	@Id
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "rank_code", length = 20)
	public String getRankCode() {
		return this.rankCode;
	}

	public void setRankCode(String rankCode) {
		this.rankCode = rankCode;
	}

	@Column(name = "rank_name", length = 20)
	public String getRankName() {
		return this.rankName;
	}

	public void setRankName(String rankName) {
		this.rankName = rankName;
	}

	@Column(name = "backup", length = 65535)
	public String getBackup() {
		return this.backup;
	}

	public void setBackup(String backup) {
		this.backup = backup;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "TBookRank")
	public Set<TReleaseSell> getTReleaseSells() {
		return this.TReleaseSells;
	}

	public void setTReleaseSells(Set<TReleaseSell> TReleaseSells) {
		this.TReleaseSells = TReleaseSells;
	}

}